package com.epfly.promo.activity.impl;

import com.epfly.promo.activity.entity.ActivityTaskEntity;
import lombok.Data;

/**
 * 优惠活动任务包装类，内含活动实体和执行活动的方法调用。
 */

@Data
public class ActivityTaskWrapper implements Runnable{

    private ActivityTaskEntity taskEntity;


    private ActivityTaskServiceImpl activityTaskService;

    public ActivityTaskWrapper(ActivityTaskServiceImpl activityTaskService, ActivityTaskEntity taskEntity) {

        this.activityTaskService = activityTaskService;
        this.taskEntity = taskEntity;
    }

    @Override
    public void run() {
        activityTaskService.performTakeEffectActivityDo(taskEntity);
    }
}
